package com.sangmo.fts.process.receivable.service;

import com.sangmo.boot.framework.plugin.dataview.crud.service.BaseViewService;
import com.sangmo.boot.framework.plugin.dataview.data.IDataViewRepo;
import com.sangmo.fts.process.receivable.model.RpfWaybillItem;
import com.sangmo.fts.process.receivable.repo.RpfWaybillItemRepo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class RpfWaybillItemEntityService extends BaseViewService<RpfWaybillItem> {

    @Autowired
    private RpfWaybillItemRepo rpfWaybillItemRepo;

    @Override
    protected IDataViewRepo<RpfWaybillItem> getRepo() {
        return rpfWaybillItemRepo;
    }

    public List<RpfWaybillItem> saveAll(List<RpfWaybillItem> waybillItems) {
        return rpfWaybillItemRepo.saveAll(waybillItems);
    }
}
